Skip to content

fix: load libudev and libdbus at runtime instead of linking them - #271

Merged
devopvoid merged 3 commits into
devopvoid:mainfrom
SendableMetatype:fix/linux-runtime-loaders
Sep 7, 2026
Merged

fix: load libudev and libdbus at runtime instead of linking them#271
devopvoid merged 3 commits into
devopvoid:mainfrom
SendableMetatype:fix/linux-runtime-loaders

Conversation

@SendableMetatype

Copy link
Copy Markdown
Contributor

After #267, libudev and libdbus were the last libraries the Linux natives linked for this library's own code, so they still failed to load on any host without them, although only the V4L2 device manager uses libudev and only the power management uses libdbus. Both now open their library on first use and bind the symbols they need, the same way the PulseAudio device manager handles libpulse. A host without libudev gets an exception when it enumerates cameras, and a host without libdbus logs a warning and skips the screen saver inhibition. Every remaining link-time dependency of the Linux natives now comes from libwebrtc's desktop capturers. The test runners no longer install the two packages, so the lanes verify the natives load without them.

The Linux natives linked libudev, so they failed to load on any host
without it, although only the V4L2 device manager uses it. The manager
now opens libudev.so.1 on construction and binds the symbols it needs,
the same way the PulseAudio device manager handles libpulse. A host
without libudev gets an exception when it enumerates cameras instead of
a load failure.
Only the Linux power management uses libdbus, to ask the screen saver
not to start during desktop capture. It now opens libdbus-1.so.3 on
first use and binds the symbols it needs. A host without libdbus logs
a warning and skips the inhibition instead of failing to load the
natives. The dbus headers are still required at build time.
The test runners no longer install the two libraries, so the lanes
verify that the natives load without them.
@devopvoid
devopvoid merged commit 45d417e into devopvoid:main Sep 7, 2026
11 checks passed
@SendableMetatype
SendableMetatype deleted the fix/linux-runtime-loaders branch September 7, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants